3.428 \(\int \cos ^3(c+d x) (a+b \tan ^2(c+d x)) \, dx\)

Optimal. Leaf size=32 \[ \frac {a \sin (c+d x)}{d}-\frac {(a-b) \sin ^3(c+d x)}{3 d} \]

[Out]

a*sin(d*x+c)/d-1/3*(a-b)*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {3676} \[ \frac {a \sin (c+d x)}{d}-\frac {(a-b) \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]

[Out]

(a*Sin[c + d*x])/d - ((a - b)*Sin[c + d*x]^3)/(3*d)

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \left (a-(a-b) x^2\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {a \sin (c+d x)}{d}-\frac {(a-b) \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 44, normalized size = 1.38 \[ -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]

[Out]

(a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d) + (b*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 30, normalized size = 0.94 \[ \frac {{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, a + b\right )} \sin \left (d x + c\right )}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="fricas")

[Out]

1/3*((a - b)*cos(d*x + c)^2 + 2*a + b)*sin(d*x + c)/d

________________________________________________________________________________________

giac [A]  time = 1.48, size = 36, normalized size = 1.12 \[ -\frac {a \sin \left (d x + c\right )^{3} - b \sin \left (d x + c\right )^{3} - 3 \, a \sin \left (d x + c\right )}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="giac")

[Out]

-1/3*(a*sin(d*x + c)^3 - b*sin(d*x + c)^3 - 3*a*sin(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 0.63, size = 36, normalized size = 1.12 \[ \frac {\frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x)

[Out]

1/d*(1/3*b*sin(d*x+c)^3+1/3*a*(2+cos(d*x+c)^2)*sin(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 29, normalized size = 0.91 \[ -\frac {{\left (a - b\right )} \sin \left (d x + c\right )^{3} - 3 \, a \sin \left (d x + c\right )}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/3*((a - b)*sin(d*x + c)^3 - 3*a*sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 12.10, size = 47, normalized size = 1.47 \[ \frac {9\,a\,\sin \left (c+d\,x\right )+3\,b\,\sin \left (c+d\,x\right )+a\,\sin \left (3\,c+3\,d\,x\right )-b\,\sin \left (3\,c+3\,d\,x\right )}{12\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(a + b*tan(c + d*x)^2),x)

[Out]

(9*a*sin(c + d*x) + 3*b*sin(c + d*x) + a*sin(3*c + 3*d*x) - b*sin(3*c + 3*d*x))/(12*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*tan(d*x+c)**2),x)

[Out]

Integral((a + b*tan(c + d*x)**2)*cos(c + d*x)**3, x)

________________________________________________________________________________________